package com.hspedu.seckill.model.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * @author: xujiabing
 * @date: 2024-10-02 19:16
 * @description 响应信息枚举类
 */
@AllArgsConstructor
@Getter
@ToString
public enum RespBeanEnum {
    // 通用
    SUCCESS(200, "SUCCESS"),
    ERROR(500, "服务端异常"),
    // 登录模块
    LOSS_LOGIN(500110, "用户没有登录"),
    LOGIN_ERROR(500210, "用户名或者密码错误"),
    MOBILE_ERROR(500211, "手机号码格式不正确"),
    BING_ERROR(500212, "参数绑定异常"),
    MOBILE_NOT_EXIST(500213, "手机号码不存在"),
    PASSWORD_UPDATE_FAIL(500214, "更新密码失败"),
    // 接口安全相关
    REQUEST_ILLEGAL(500503, "请求非法"),
    SESSION_ERROR(500502, "用户信息有误"),
    SEC_KILL_WAIT(500504, "排队中...."),
    CAPTCHA_ERROR(500505, "验证码错误"),
    ACCESS_LIMIT_REACHED(500506, "访问太频繁,请稍后再试"),

    // 秒杀模块
    REPEATE_ERROR(500501, "该商品每人限购一件"),
    ENTRY_STOCK(600500, "库存不足"),
    SEC_KILL_RETRY(600502, "本次抢购失败,请继续抢购");

    private final Integer code;
    private final String message;
}
